package com.goktech.olala.core.service.impl;

import com.goktech.olala.core.resp.RespBuyInfoVo;
import com.goktech.olala.core.service.IOrderMasterService;
import com.goktech.olala.server.dao.order.OrderMasterMapper;
import com.goktech.olala.server.pojo.order.OrderMaster;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname IOrderMasterServiceImp
 * @Description TODO
 * @Date 2020/12/26 12:53
 * @Created by ASUS
 */
@Service
public class IOrderMasterServiceImp implements IOrderMasterService {

    @Autowired
    OrderMasterMapper orderMasterMapper;

    @Override
    public int deleteByPrimaryKey(Integer orderId) {
        int i = orderMasterMapper.deleteByPrimaryKey(orderId);
        return i;
    }

    @Override
    public int insert(OrderMaster record) {
        int insert = orderMasterMapper.insert(record);
        return insert;
    }

    @Override
    public OrderMaster selectByPrimaryKey(Integer orderId) {
        OrderMaster orderMaster = orderMasterMapper.selectByPrimaryKey(orderId);
        return orderMaster;
    }

    @Override
    public List<OrderMaster> selectAll() {
        List<OrderMaster> orderMasterList = orderMasterMapper.selectAll();
        return orderMasterList;
    }

    @Override
    public int updateByPrimaryKey(OrderMaster record) {
        int i = orderMasterMapper.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public List<OrderMaster> selectOrderId(String customerId,String orderSn) {
        List<OrderMaster> orderIdList = orderMasterMapper.selectOrderId(customerId,orderSn);
        return orderIdList;
    }

}
